<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<title>分类管理</title>

<link rel="stylesheet" type="text/css"
	href="__PUBLIC__/skin/admin/css/base.css">

<script language="javascript">

function viewArc(aid){

	if(aid==0) aid = getOneItem();

	window.open("archives.asp?aid="+aid+"&action=viewArchives");

}

function editArc(aid){

	if(aid==0) aid = getOneItem();

	location="archives.asp?aid="+aid+"&action=editArchives";

}

function updateArc(aid){

	var qstr=getCheckboxItem();

	if(aid==0) aid = getOneItem();

	location="archives.asp?aid="+aid+"&action=makeArchives&qstr="+qstr+"";

}

function checkArc(aid){

	var qstr=getCheckboxItem();

	if(aid==0) aid = getOneItem();

	location="archives.asp?aid="+aid+"&action=checkArchives&qstr="+qstr+"";

}

function moveArc(aid){

	var qstr=getCheckboxItem();

	if(aid==0) aid = getOneItem();

	location="archives.asp?aid="+aid+"&action=moveArchives&qstr="+qstr+"";

}

function adArc(aid){

	var qstr=getCheckboxItem();

	if(aid==0) aid = getOneItem();

	location="archives.asp?aid="+aid+"&action=commendArchives&qstr="+qstr+"";

}

function delArc(aid){
	var qstr=getCheckboxItem();
	alert(qstr);
	if(aid==0) aid = getOneItem();

	location="/Admin.php?m=Ads&a=del1&id="+aid+"&qstr="+qstr;
	
}



//获得选中文件的文件名

function getCheckboxItem()

{

	var allSel="";

	if(document.form2.id.value) return document.form2.id.value;

	for(i=0;i<document.form2.id.length;i++)

	{

		if(document.form2.id[i].checked)

		{

			if(allSel=="")

				allSel=document.form2.id[i].value;

			else

				allSel=allSel+","+document.form2.id[i].value;

		}

	}

	return allSel;

}



//获得选中其中一个的id

function getOneItem()

{

	var allSel="";

	if(document.form2.id.value) return document.form2.id.value;

	for(i=0;i<document.form2.id.length;i++)

	{

		if(document.form2.id[i].checked)

		{

				allSel = document.form2.id[i].value;

				break;

		}

	}

	return allSel;

}

function selAll()

{

	for(i=0;i<document.form2.id.length;i++)

	{

		if(!document.form2.id[i].checked)

		{

			document.form2.id[i].checked=true;

		}

	}

}

function noSelAll()

{

	for(i=0;i<document.form2.id.length;i++)

	{

		if(document.form2.id[i].checked)

		{

			document.form2.id[i].checked=false;

		}

	}

}

</script>

</head>

<body leftmargin="8" topmargin="8"
	background='__PUBLIC__/skin/images/allbg.gif'>



<!--  快速转换位置按钮  -->

<table width="98%" border="0" cellpadding="0" cellspacing="1"
	bgcolor="#D1DDAA" align="center">

	<tr>

		<td height="26" background="__PUBLIC__/skin/images/newlinebg3.gif">

		<table width="98%" border="0" cellspacing="0" cellpadding="0">

			<tr>

				<td align="center">首页广告列表</td>

			</tr>

		</table>

		</td>

	</tr>

</table>

<!--  内容列表   -->

<form name="form2"><!--

<iframe src="http://www.168ad.cc/page/?s=9609"  width="250" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>

-->
<table width="98%" border="0" cellpadding="2" cellspacing="1"
	bgcolor="#D1DDAA" align="center" style="margin-top: 8px">

	<tr bgcolor="#E7E7E7">

		<td height="24" colspan="7"
			background="__PUBLIC__/skin/images/tbg.gif">&nbsp;分类列表&nbsp;</td>

	</tr>

	<tr align="center" bgcolor="#FAFAF1" height="22">

		<td width="4%" height="28">ID</td>

		<td width="4%">选择</td>

		<td width="10%" align="center">分类名</td>

		<td width="30%" align="center">内容</td>
		<td width="25%" align="center">链接地址</td>
		<td align="center">备注</td>
	<td width="120" align="center">到期时间</td>
		<td width="7%" align="center">操作</td>



	</tr>

	<volist name="list" id="vo">

	<tr align='center' bgcolor="#FFFFFF"
		onMouseMove="javascript:this.bgColor='#FCFDEE';"
		onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">

		<td>{$vo['id']}</td>

		<td><input name="id" type="checkbox" id="id" value="{$vo['id']}"
			class="np"></td>

		<td align="left"><a href='__URL__/edit/id/{$vo.id}'><u
			style="text-decoration: none;"> {$vo['type']}</u></a></td>
		<td align="left"><img src="{$vo['content']}" width="100%" height="50"/></td>
		<td align="center">{$vo['url']}</td>
		<td align="center">{$vo['remark']}</td>
        		<td align="center">{$vo['endtime']|date="Y-m-d",###}</td>
		<td><a href="{:U('edit1',array('id'=>$vo['id']))}">编辑</a> | <a
			href="{:U('del1',array('id'=>$vo['id']))}">删除</a></td>
		<!-- -->





	</tr>
	</volist>





<tr bgcolor="#FAFAF1">

<td height="28" colspan="10">

	&nbsp;

	<a href="javascript:selAll()" class="coolbg">全选</a>

	<a href="javascript:noSelAll()" class="coolbg">取消</a>
 
    <a href="javascript:delArc(0)" class="coolbg">&nbsp;删除&nbsp;</a>


</td>

</tr>



	<tr align="right" bgcolor="#EEF4EA">

		<td height="36" colspan="7" align="center"><!--翻页代码 --></td>

	</tr>

</table>



</form>





</body>

</html>